package com.ldwx.center.controller;

import com.ldwx.center.common.entity.Result;
import com.ldwx.center.model.Task;
import com.ldwx.center.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("task")
public class TaskController {
    @Autowired
    private TaskService taskService;
    @RequestMapping("addTask")
    public Result addTask(Task task){

        return taskService.addTask(task);
    }
    @RequestMapping("list")
    public Result getAll(){
        return taskService.getAll();
    }


}
